//
//  XBMenuCell.m
//  Home
//
//  Created by 陈明茂 on 16/3/29.
//  Copyright © 2016年 iOS. All rights reserved.
//

#import "XBMenuCell.h"
#import "Masonry.h"

@interface XBMenuCell()

// 按钮
@property (strong, nonatomic) UIButton *menuBtn;

@end


@implementation XBMenuCell

- (instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
      
        [self setUI];
        
    }
    return self;
}


- (instancetype)initWithCoder:(NSCoder *)aDecoder{
    
    if (self = [super initWithCoder:aDecoder]) {
     
        [self setUI];
    }
    return self;
}


#pragma mark - 设置视图
- (void)setUI{
    
    // 创建菜单按钮
    UIButton *btn = [[UIButton alloc] init];
    self.menuBtn = btn;
    [btn setBackgroundImage:[UIImage imageNamed:@"签到"] forState:UIControlStateNormal];
    [self addSubview:btn];
    
}

#pragma mark - 布局子控件
- (void)layoutSubviews{
    
    [super layoutSubviews];
    
    // 布局按钮
    [self.menuBtn mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.edges.equalTo(self);
    }];
}



@end
